package components.list.item
{
	import flash.display.SimpleButton;
	import flash.display.Sprite;
	import flash.text.TextField;
	
	internal class Title extends Sprite
	{
		private var _txtName:TextField;
		private var _btnModyfi:SimpleButton;
		
		private var _content:Sprite;
		
		public function Title()
		{
			super();
			init();
		}
		
		private function init():void
		{
			_content = new TitlePanel();
			addChild( _content );
			
			_txtName = _content.getChildByName("txtname") as TextField;
			_btnModyfi = _content.getChildByName("btnmodify") as SimpleButton;
			
			_btnModyfi.visible = false;
		}
		
		public function set modyfiVisible( value:Boolean ):void
		{
			_btnModyfi.visible = value;
		}
		
		public function set name( value:String ):void
		{
			_txtName.htmlText = value;
		}
	}
}